package com.syni.mdd.yhd.common.all.controller.protect.activity;

import com.syni.mdd.sjb.common.component.utils.common.annotations.CheckParams;
import com.syni.mdd.yhd.common.all.service.activity.BmsBackCardService;
import com.syni.mdd.sjb.common.component.utils.common.utils.ParamsMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @className BmsBackCardController
 * @description TOO
 * @Author cfx
 * @DATE 2019/11/11 16:53
 * @VERSION 1.0
 **/
@RestController
@RequestMapping("/backCard")
public class BmsBackCardController {

    @Autowired
    BmsBackCardService bmsBackCardService;

    /**
     * @Description 是否有这个活动
     * @Author: cfx
     * @Date: 2019/8/2
     */
    @PostMapping("openBackCardActivity")
    @CheckParams
    public Map<String,Object> openBackCardActivity(@RequestBody ParamsMap paramsMap){
        return bmsBackCardService.openBackCardActivity(paramsMap);
    }

    @PostMapping("/getMyBackCard")
    @CheckParams(checkAuth = true)
    public Map<String,Object> getMyBackCard(@RequestBody ParamsMap paramsMap){
        return bmsBackCardService.getMyBackCard(paramsMap);
    }

    /** 
     * @Description
     * @Author: cfx 
     * @Date: 2019/11/12 
     */
    @PostMapping("/getMyBackCardTask")
    @CheckParams(checkAuth = true)
    public Map<String,Object> getMyBackCardTask(@RequestBody ParamsMap paramsMap){
        return bmsBackCardService.getMyBackCardTask(paramsMap);
    }

    /**
     * @Description
     * @Author: cfx
     * @Date: 2019/11/12
     */
    @PostMapping("/startMyTask")
    @CheckParams(checkAuth = true)
    public Map<String,Object> startMyTask(@RequestBody ParamsMap paramsMap){
        return bmsBackCardService.startMyTask(paramsMap);
    }

    /**
     * @Description 提现按钮
     * @Author: cfx
     * @Date: 2019/11/12
     */
    @PostMapping("/withdrawal")
    @CheckParams(checkAuth = true)
    public Map<String,Object> withdrawal(@RequestBody ParamsMap paramsMap){
        return bmsBackCardService.withdrawal(paramsMap);
    }



}
